﻿<Window x:Class="EDMDesigner.Designer.Controls.CSDLType.AddPropertyWindows.AddAssociationWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:localControlsCSDLTypeAddPropertyWindows="clr-namespace:EDMDesigner.Designer.Controls.CSDLType.AddPropertyWindows"
    Title="{x:Static localControlsCSDLTypeAddPropertyWindows:AddAssociationWindow.WindowTitle}" 
    Width="600" 
    Height="240" 
    ResizeMode="NoResize"   
    WindowStartupLocation="CenterOwner"
    Loaded="Window_Loaded">

    <Grid Margin="5,0,5,5">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <StackPanel Margin="0,5,0,5" Orientation="Horizontal">
            <TextBlock Text="{x:Static localControlsCSDLTypeAddPropertyWindows:AddAssociationWindow.AssociationNameTextBlockText}" Margin="0,0,10,0"  VerticalAlignment="Center" />
            <TextBox x:Name="associationNameTextBox" Text="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type localControlsCSDLTypeAddPropertyWindows:AddAssociationWindow}}, Path=AssociationName}" Height="25" Width="534" />
        </StackPanel>
        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <localControlsCSDLTypeAddPropertyWindows:AddAssociationEnd x:Name="navigationProperty1" Grid.Column="0" PropertyChanged="NavigationProperty_PropertyChanged" />
            <localControlsCSDLTypeAddPropertyWindows:AddAssociationEnd x:Name="navigationProperty2" Grid.Column="1" PropertyChanged="NavigationProperty_PropertyChanged" />
        </Grid>
        <StackPanel Grid.Row="2" HorizontalAlignment="Right" Orientation="Horizontal" Margin="5,5,5,5">
            <Button Width="80" Height="25" Margin="0,0,5,0" Content="{x:Static localControlsCSDLTypeAddPropertyWindows:AddAssociationWindow.CancelButtonText}" IsCancel="True" Click="CancelButton_Click" />
            <Button Width="80" Height="25" Content="{x:Static localControlsCSDLTypeAddPropertyWindows:AddAssociationWindow.OkButtonText}" IsDefault="True" Click="OkButton_Click" IsEnabled="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type localControlsCSDLTypeAddPropertyWindows:AddAssociationWindow}}, Path=AllowOk}" />
        </StackPanel>
    </Grid>
</Window>
